import cv2
import os

root = './data/Bago_highway_10'
for file in os.listdir(root):
    img = cv2.imread(root + '/' + file)

    img = cv2.copyMakeBorder(img, 420, 420, 0, 0, cv2.BORDER_CONSTANT, value=0)  # 上 下 左 右
    img = cv2.resize(img, (608, 608))
    cv2.imwrite(root + '_pad/' + file, img)
